home *** CD-ROM | disk | FTP | other *** search
- /*
- GetTLE - alerts.h - Handling of alerts - the implementation
- Copyright ⌐2000 Andreas Schneider
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #ifdef linux
- #include <stdio.h>
- #else
- #include <PalmOS.h>
- #include "GetTLERsc.h" // application resource defines
- #endif
- #include "alerts.h"
-
-
- // Error message pop up function that displays one or two strings
- extern void MyErrorFunc(char *error, char *additional)
- {
- #ifdef linux
- fprintf(stderr,"ERR: %s %s\n",error,additional?additional:"");
- #else
- FrmCustomAlert(ErrorAlert, error, additional ? additional : "", NULL);
- #endif
- return;
- }
-
- // pop up a status message
- extern void MyStatusFunc(char *status)
- {
- #ifdef linux
- fprintf(stderr,"MSG: %s\n",status);
- #else
- FrmCustomAlert(StatusAlert, status, NULL, NULL);
- #endif
- return;
- }
-
- extern short MyConfirmFunc(char *question)
- {
- short confirmed=0;
- #ifdef linux
- #else
- if (FrmCustomAlert(ConfirmAlert,question,NULL,NULL)==ConfirmYes)
- {
- confirmed=1;
- }
- #endif
- return confirmed;
- }
-